import axios from "axios";

export function xuanranAPI(params) {
  return axios({
    url: "http://localhost:3001/data",
    method: "GET",
    params,
  });
}

export function xinzengAPI(data) {
  return axios({
    url: "http://localhost:3001/data",
    method: "POST",
    data,
  });
}
export function shanchuAPI(data) {
  return axios({
    url: "http://localhost:3001/data/:id",
    method: "DELETE",
    data,
  });
}
export function bianjiAPI(data) {
  return axios({
    url: "http://localhost:3001/data/:id",
    method: "PUT",
    data,
  });
}
export function sousuoAPI(data) {
  return axios({
    url: "http://localhost:3001/data/?name=关键词",
    method: "GET",
    data,
  });
}
export function xiangqingAPI(data) {
  return axios({
    url: "http://localhost:3001/data/:id",
    method: "POST",
    data,
  });
}
